package com.momo.utils;

import com.google.common.base.Splitter;
import com.google.common.collect.Lists;

import java.util.List;

/**
 * Created by 李杰 on 2018/8/13.
 */
public class StringUtil {
    public static List<Integer> splitToListInt(String str) {
        //1,2,3,
        List<String> strList = Splitter.on(",").trimResults().omitEmptyStrings().splitToList(str);
        List<Integer> list= Lists.newArrayList();
        for (String s : strList) {
            list.add(Integer.parseInt(s));
        }
        return list;
    }
}
